1. Field of the Invention
The present invention relates to a control system using a programmable logic controller ("PLC"), and more particularly to an improved control system capable of preventing an error operation from occurring in any of a plurality of remote slave units ("RSU"), which error may result from an abnormal state of a master PLC or a communication line.
2. Description of the Prior Art
In general, a PLC system controls a plurality of control targets, such as an electrical switch serving as an input/output (I/O) connection point which is coupled to the PLC by a program that is set by a user. Such a PLC system employs a multi-drop method (1:N communication) in which a plurality of communication stations are connected to each other in a single network.
A local area communication method is adopted to perform the communication between PLC systems, wherein an amount of data ranging from several to dozens of bytes are exchanged in real time base within production lines by use of a manufacturing automation system.
With regard to required data such as the number of packages, errors and out items, the PLC located in each production line utilizing such a manufacturing automation system carries out a real time receive/transmit operation from/to respective PLCs disposed in the other production lines, thereby performing a cooperative task according to the received data.
The PLC and its control targets connected thereto, and the control between the I/O connection points will now be described.
In order to realize such a control system by use of PLC, the PLC requires a CPU (Central Process Unit) and an I/O module provided a distance therefrom.
For economic purposes, instead of installing the CPU and the remote I/O module in each area where control targets are densely populated in the control system, a plurality of remote slave units perform a communication function and an I/O control function, respectively, so that the RSU is widely employed to extend the I/O capacity of the CPU in PLC and to control a remote I/O function.
FIG. 1 illustrates a conventional control system including a master PLC(M) and a plurality of RSUs(R1-Rn). As shown therein, the master PLC(M) including a master PLC, a data link, and an I/O module, controls its own I/O connection points using a program and a communication parameter which are set by a user, and also controls the respective I/O connection points for the remote slave units R1-Rn.
Each of the plurality of RSUs(R1-Rn) has at least one I/O module, and carries out a data communication with the master PLC(M) through a communication cable, and accordingly controls its own I/O module.
With reference to FIG. 2, each of the RSUs includes: a MODEM 10 for carrying out a communication with the master PLC(M) via a communication cable; a receive/transmit module 11 for exchanging data with the master PLC(M) according to a predetermined protocol; a receive/transmit buffer 12 for temporarily storing therein the data for the exchange; an output data storage unit 13 for storing therein the data which are to be transmitted from the master PLC(M) to an input/output module 16; an input data storage unit 14 for storing therein the data which are to be transmitted from the input/output module 16 to the master PLC(M); and an input/output control module 15 for controlling a data transmission between the data storage units 13, 14 and the input/output module 16.
The operation of the thusly constituted conventional control system will now be explained with reference to the accompanying drawings.
First, the data link in the master PLC(M) is a data linking device attached to the master PLC(M), which operates as a master unit in the related network, and which obtains an initiative of the data communication. The data link is able to set a maximum number N of RSUs.
The RSU sets each number of its own and the master PLC(M), and receives a communication directly from the master PLC(M) for thereby carrying out a data transmission.
The data link in the master PLC(M) sequentially selects the RSUs(R1-Rn) and carries out a data receiving/transmitting operation.
For example, when the data outputted from the master PLC(M) is applied through the communication cable and the MODEM 10 to the RSU(R1), the applied data passes through the receive/transmit buffer 12 and the receive/transmit module 11, and is stored in the output data storage unit 13. The data stored in the output data storage unit 13 is outputted to the input/output module 16 in accordance with the control of the input/output control module 15.
The external control target data read from the input/output module 16 of the remote slave unit R1 is stored in the input data storage unit 14 in accordance with the control of the input/output control module 15. The data stored in the input data storage unit 14 is transmitted through the receive/transmit buffer 12 and the receive/transmit module 11 to the master PLC(M).
FIGS. 3A through 3D are views illustrating respective power-on time points of the master PLC(M) and the RSU(R1-R3), wherein the respective power-on time points of the RSUs differ from the master PLC(M) by Tg1.about.Tg3 based on the different distances therebetween, Therefore, power-on time Ton and operation start time Ts of the RSUs(R1-R3) are different from each other, and the respective RSUs(R1-R3) become operable with time differences in Tg1.about.Tg3 on the basis of the master PLC(M).
As a result, the master PLC(M) does not obtain reliability with regard to the RSUs(R1-R3) during each of the Tg1.about.Tg3, and when a cooperative task is being carried out in accordance with the input/output values of the RSUs(R1-R3), there may occur an error operation in the manufacturing automation system due to the inconsistency in such operation time points.
Also, because the RSU does not carry out a user's program independently and it because controls the data communication and the input/output connection points in accordance with a CPU program in the PLC, the master PLC(M) tends to be unable to control the output values of the RSU under influences of an unstable communication line, a communication interruption, a power supply stoppage to the master PLC(M) and the like.
At this time, the RSU does not receive the data to be output to the output module from the master PLC(M), and accordingly the finally received data stored in the output data storage unit 13 is outputted to the output module in succession, thereby deteriorating the reliability of the control system in a variety of environments.
Further, the power supply time and power stoppage time between the remote slave units which depend upon the master PLC(M) and the individual power supply, are different from each other, whereby the input/output data does not satisfy the synchronization with regard to the input/output data.